﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Practice_DotNet.Helper
{
    internal static class InfoHelper
    {
        public static string Gender1Text = "";
        public static string Gender2Text = "";
        public static string GenderText = "";
        public static string AccountInputText = "";
        public static string PasswordInputText = "";
        public static string CurrentUserInfoText = "";
        public static string AccountText = "";
        public static string PasswordText = "";
        public static string PetNameText = "";
        public static string GenderInputText = "";
        public static string GenderAddSuccessText = "";
        public static string GenderAddFailedText = "";
        public static string AccountOrPwdErrorText = "";
        public static string UpdateInfoErrorText = "";
        public static string AllUserInfoText = "";
        public static string LastScoreText = "";
        static InfoHelper()
        {
            SelectLanguage();
        }
        public static void SelectLanguage(string languageType = "")
        {
            switch (languageType)
            {
                case "1":
                    SetLanguage_CN();
                    break;
                case "2":
                    SetLanguage_EN();
                    break;
                default:
                    SetLanguage_CN();
                    break;
            }
        }

        private static void SetLanguage_EN()
        {
            Gender1Text = "Mela";
            Gender2Text = "Female";
            AccountInputText = "Your account:";
            PasswordInputText = "Your password:";
            CurrentUserInfoText = "Current user info:";
            AccountText = "Account:";
            PasswordText = "Password:";
            PetNameText = "Pet name:";
            GenderInputText = "Chiose your gender:\r\n1.Mela\r\n2.Female";
            GenderAddSuccessText = "Gender info add success.";
            GenderAddFailedText = "Gender info add failed,try again please.";
            AccountOrPwdErrorText = "Account or password error,try again please";
            UpdateInfoErrorText = "update info failed";
            GenderText = "Gender:";
            AllUserInfoText = "All user info:";
            LastScoreText = "The last score info:";
        }

        private static void SetLanguage_CN()
        {
            Gender1Text = "男";
            Gender2Text = "女";
            AccountInputText = "请输入帐号：";
            PasswordInputText = "请输入密码：";
            CurrentUserInfoText = "当前用户信息：";
            AccountText = "账号：";
            PasswordText = "密码：";
            PetNameText = "昵称：";
            GenderInputText = "请输入对应性别的编号：\r\n1：男\r\n2：女";
            GenderAddSuccessText = "性别信息添加成功";
            GenderAddFailedText = "输入有误，请重试";
            AccountOrPwdErrorText = "帐号或密码错误，请重试";
            UpdateInfoErrorText = "更新失败";
            GenderText = "性别：";
            AllUserInfoText = "所有用户信息：";
            LastScoreText = "最近成绩信息：";
        }
    }
}
